#include<bits/stdc++.h>
using namespace std;
struct pos
{
	int x,y;
};
int main()
{
	int n,m;
	cin>>n>>m;
	vector<vector<char>> v(n+1,vector<char>(m+1));
	vector<vector<bool>> vis(n+1,vector<bool>(m+1));
	int dx[4]={0,0,-1,1};
	int dy[4]={-1,1,0,0};
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
			cin>>v[i][j];
	queue<pos> q;
	pos p;
	p.x=1,p.y=1;
	q.push(p);
	bool f=0;
	while(!q.empty())
	{
		pos tmp=q.front();
		q.pop();
		int x=tmp.x,y=tmp.y;
		if(x<1||x>n||y<1||y>m||v[x][y]=='#'||vis[x][y])continue;
		vis[x][y]=1;
		if(x==n&&y==m)
		{
			f=1;
			break;
		}
		for(int i=0;i<4;i++)
		{
			tmp.x=x+dx[i],tmp.y=y+dy[i];
			q.push(tmp);
		}
	}
	if(f)cout<<"Yes";
	else cout<<"No";
	return 0;
}
